package com.zhen.aikan.controller;

import com.zhen.aikan.entity.VodType;
import com.zhen.aikan.service.IVodTypeService;
import com.zhen.aikan.vo.Result;
import com.zhen.aikan.vo.TypeVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lijiazhen
 * @since 2023-09-11
 */
@RestController
@RequestMapping("/api/vodType")
public class VodTypeController {
    @Autowired
    private IVodTypeService vodTypeService;

    @ApiOperation("获取所有视频类型")
    @GetMapping("/vodAllType")
    public Result getAllVodType(){
        List<TypeVo> vodTypes = vodTypeService.getAllType();
        return Result.ok(vodTypes);
    }
}
